API_PROTO_FILES=$(shell find errors -name *.proto)

.PHONY: init
# init env
init:
	go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

.PHONY: errors
# generate errors proto
errors:
	protoc --proto_path=. \
 	       --go_out=paths=source_relative:. \
 	       --go-grpc_out=paths=source_relative:. \
	       $(API_PROTO_FILES)